extends ../../layout/layout

block content
  .content-wrapper
    .search-condition
      .form-inline
        form#form-search
          .form-group
            label.marginR10 编号：
              input.form-control.form-width150(type="text",name="couponName",placeholder="请输入名称")
          .form-group
            label.marginR10 使用渠道：
              select.form-control.form-width100(name="userChannel")
          .form-group
            label.marginR10 地域范围：
              select.form-control.form-width100(name="availableCity")
          .form-group
            label.marginR10 服务类型：
              select.form-control.form-width100(name="businessType")
          //- .form-group
            label.marginR10 状态：
              select.form-control.form-width100(name="status")
          .form-group
            label.marginR10 有效期：
              input.form-control.form-width200#coupon-date(type="text",name="couponDate" placeholder="请选择有效期")

    .com-op.marginT10
      button.btn.btn-default.marginR10#btn-search(type="button")
        i.fa.fa-search
        span 查询
      //- button.btn.btn-default.marginR10#btn-add(type="button")
      //-   i.fa.fa-plus
      //-   span 新建
      button.btn.btn-default.marginR10#btn-detail(type="button")
        //- i.fa.fa-edit
        span 查看

    .content-body.marginT10#table-box
      table.table#table-coupon
      #pager-coupon

block vendor_css
  link(rel='stylesheet', type="text/css", href="../../vendor/jqGrid/css/ui.jqgrid-bootstrap.css")

block self_css
  link(rel="stylesheet", type="text/css", href="../../css/marketing/coupon.css")

block vendor_js
  script(src="../../vendor/jqGrid/js/jquery.jqGrid.js")
  script(src="../../vendor/jqGrid/js/i18n/grid.locale-cn.js")
  script(src="../../vendor/laydate/laydate.js")
  script(src="../../vendor/jquery-validation-1.17.0/jquery.validate.min.js")

block self_js
  script(src="../../js/module/marketing/coupon-list.js")

block layer

  //- 新建
  .layer-box#layer-coupon
    form.mw1200.padding20#form-coupon(style="max-height:500px;overflow:auto" autocomplete="off")
      +couponForm

mixin couponForm
  .d-header 基础设置
  .d-content
    .row.form-row.form-row-sm
      .col-xs-6
        .form-text 编号抬头：
        .form-container
          input.form-control.form-width200(name="numbered")
      .col-xs-6
        .form-text 编号生成方式：
        .form-container
          label.marginR10
            input(type="radio", name="codeType",  value="2" disabled)
            span &ensp;按生成时间
          label
            input(type="radio", name="codeType",  value="3" disabled)
            span &ensp;排序
    .row.form-row.form-row-sm
      .col-xs-6
        .form-text 起始数字：
        .form-container
          input.form-control.form-width200(name="startNum")
      .col-xs-6
        .form-text 累加幅度：
        .form-container
          input.form-control.form-width100(name="cumulativeNum")
    .row.form-row.form-row-sm
      .col-xs-8
        .form-text 代金券面额：
        .form-container
          input.form-control.form-width200(name="couponAmount" placeholder="请输入代金券全面金额")
          | 元
    .row.form-row.form-row-sm
      .col-xs-8
        .form-text 最低结算金额：
        .form-container
          input.form-control.form-width200(name="minSettleAmount" placeholder="请输入最低结算金额")
          | 元
    .row.form-row.form-row-sm
      .col-xs-4
        .form-text 是否支持折后使用：
        .form-container
          select.form-control(name="discountFlag")
            option(value="1") 是
            option(value="2") 否
    .row.form-row.form-row-sm
      .col-xs-6
        .form-text 领取有效期：
        .form-container
          input.form-control.form-width200#validityTime(placeholder="请选择领取有效期时间范围" name="validityTime" disabled)
          input(type="hidden" name="validityStartTime")
          input(type="hidden" name="validityEndTime")
    .row.form-row.form-row-sm
      .col-xs-6
        .form-text 使用有效期：
        .form-container
          label.marginR10
            input(type="radio", name="useValidityType", value="1" disabled)
            span &ensp;固定时间
          label
            input(type="radio", name="useValidityType", value="2" disabled)
            span &ensp;领取后计时
    .row.form-row.form-row-sm
      .col-xs-6
        .form-text 使用期限：
        .form-container
          input.form-control.form-width200#useTime(placeholder="请选择使用期限时间范围" name="useTime" disabled)
          input(type="hidden" name="useStartTime")
          input(type="hidden" name="useEndTime")
    .row.form-row.form-row-sm
      .col-xs-6
        .form-text 失效时间设置：
        .form-container
          input.form-control.form-width100(name="invalidDate")
          | 天
  .d-header 范围设置
  .d-content
    .row.form-row.form-row-sm
      .col-xs-12
        .form-text 业务类型：
        .form-container
          .range-set#sel-businessType
            +tempLabels
          .text-gray 选择该类型代金券适用哪种用车场景
    .row.form-row.form-row-sm
      .col-xs-12
        .form-text 用车类型：
        .form-container
          .range-set#sel-carType
            +tempLabels
          .text-gray 选择该代金券适用哪种车型
    .row.form-row.form-row-sm
      .col-xs-12
        .form-text 报价类型：
        .form-container
          .range-set#sel-offerType
            +tempLabels
          .text-gray 选择该代金券适用哪种报价类型
    .row.form-row.form-row-sm
      .col-xs-12
        .form-text 使用渠道：
        .form-container
          .range-set#sel-userChannel
            +tempLabels
          .text-gray 选择该代金券适用哪些端口
    .row.form-row.form-row-sm
      .col-xs-12
        .form-text 使用者：
        .form-container
          .range-set#sel-userType
            +tempLabels
          .text-gray 配置该代金券可给哪些人使用
    .row.form-row.form-row-sm
      .col-xs-12
        .form-text 可用城市：
        .form-container
          .range-set#sel-cityType
            +tempLabels
          .text-gray 配置该代金券可给哪些城市使用
  .d-header 其他设置
  .d-content
    .row.form-row.form-row-sm
      .col-xs-10
        .form-text 备注：
        .form-container
          textarea.form-control(name="remark" placeholder="说明与备注信息")
  .text-center.marginB10.marginT10
    button.btn.btn-primary#coupon-edit(type="button")
      i.fa.fa-edit
      span 修改
  .text-center.marginB10.marginT10
    button.btn.btn-primary.hide#btn-save(type="button")
      i.fa.fa-save
      span 保存



mixin tempLabels
  label
    input(type="checkbox")
    | 立即用车
  label
    input(type="checkbox")
    | 立即用车
  label
    input(type="checkbox")
    | 立即用车
  label
    input(type="checkbox")
    | 立即用车
  label
    input(type="checkbox")
    | 立即用车
  label
    input(type="checkbox")
    | 立即用车


